package carcassonne.game.player;

import carcassonne.user.UserInfo;

public class PlayerInfo {

    public String id;

    public String nickname;

    // 玩家的头像编号
    public int avatar;

    // 玩家的行动顺序
    public int sequence;

    // 玩家的座位号
    public int seat;

    // 玩家的颜色编号
    public int color;

    public int role;

    public int team;

    public PlayerInfo(UserInfo userInfo, int sequence) {

        this.id = userInfo.id;
        this.nickname = userInfo.nickname;
        this.avatar = userInfo.avatar;

        this.sequence = sequence;
        // 默认颜色和玩家序号一致
        this.color = sequence;
        this.team = 0;
    }

    public PlayerInfo(Player player) {
        this.id = player.id;
        this.nickname = player.nickname;
        this.avatar = player.avatar;
        this.sequence = player.sequence;
        this.seat = player.seat;
        this.color = player.color;
        this.role = player.role;
        this.team = player.team;
    }
}